package com.ruoyi.ihome.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ihome.mapper.RoomAndDistrictMapper;
import com.ruoyi.ihome.domain.RoomAndDistrict;
import com.ruoyi.ihome.service.IRoomAndDistrictService;

/**
 * 房间区域中间表Service业务层处理
 * 
 * @author mage
 * @date 2024-08-13
 */
@Service
public class RoomAndDistrictServiceImpl implements IRoomAndDistrictService 
{
    @Autowired
    private RoomAndDistrictMapper roomAndDistrictMapper;

    /**
     * 查询房间区域中间表
     * 
     * @param id 房间区域中间表主键
     * @return 房间区域中间表
     */
    @Override
    public RoomAndDistrict selectRoomAndDistrictById(Long id)
    {
        return roomAndDistrictMapper.selectRoomAndDistrictById(id);
    }

    /**
     * 查询房间区域中间表列表
     * 
     * @param roomAndDistrict 房间区域中间表
     * @return 房间区域中间表
     */
    @Override
    public List<RoomAndDistrict> selectRoomAndDistrictList(RoomAndDistrict roomAndDistrict)
    {
        return roomAndDistrictMapper.selectRoomAndDistrictList(roomAndDistrict);
    }

    /**
     * 新增房间区域中间表
     * 
     * @param roomAndDistrict 房间区域中间表
     * @return 结果
     */
    @Override
    public int insertRoomAndDistrict(RoomAndDistrict roomAndDistrict)
    {
        return roomAndDistrictMapper.insertRoomAndDistrict(roomAndDistrict);
    }

    /**
     * 修改房间区域中间表
     * 
     * @param roomAndDistrict 房间区域中间表
     * @return 结果
     */
    @Override
    public int updateRoomAndDistrict(RoomAndDistrict roomAndDistrict)
    {
        return roomAndDistrictMapper.updateRoomAndDistrict(roomAndDistrict);
    }

    /**
     * 批量删除房间区域中间表
     * 
     * @param ids 需要删除的房间区域中间表主键
     * @return 结果
     */
    @Override
    public int deleteRoomAndDistrictByIds(Long[] ids)
    {
        return roomAndDistrictMapper.deleteRoomAndDistrictByIds(ids);
    }

    /**
     * 删除房间区域中间表信息
     * 
     * @param id 房间区域中间表主键
     * @return 结果
     */
    @Override
    public int deleteRoomAndDistrictById(Long id)
    {
        return roomAndDistrictMapper.deleteRoomAndDistrictById(id);
    }
}
